import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
// 导入element-plus
import ElementPlus from 'element-plus'
// 导入element-plus样式
import 'element-plus/dist/index.css'
// 导入element-plus图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 引入中文语言包
import zhCn from 'element-plus/es/locale/lang/zh-cn'

import App from './App.vue'
import router from './router'

const app = createApp(App)

// 使用element-plus
app.use(ElementPlus, {
    // 设置为中文
    locale: zhCn,
})
// 使用element-plus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(createPinia())
app.use(router)

app.mount('#app')
